home *** CD-ROM | disk | FTP | other *** search
/ Enigma Amiga Life 109 / EnigmaAmiga109CD.iso / dalla rivista / host contacted / jikes.lha / jikes-1.11 / src / configure.in < prev    next >
Text File  |  2000-01-16  |  17KB  |  552 lines

  1. # $Id: configure.in,v 1.23 2000/01/07 22:19:46 lord Exp $
  2. dnl    This file is an input file used by the GNU "autoconf" program to
  3. dnl    generate the file "configure", which is run to configure the
  4. dnl    Makefile in this directory.
  5. AC_INIT(jikes.cpp)
  6. AC_PREREQ(2.13)
  7.  
  8. # Convert srcdir into full path name
  9. srcdir=`cd $srcdir ; pwd`
  10. echo "srcdir is $srcdir"
  11.  
  12. # Let configure look for a c and c++ compiler and find the system
  13. # defined object and executable extensions. Also do some extra
  14. # checks to find out if we are running in a cygwin environment
  15.  
  16. AC_LANG_CPLUSPLUS
  17. AC_PROG_CXX
  18. AC_CYGWIN
  19. AC_OBJEXT
  20. AC_EXEEXT
  21.  
  22. # FIXME : bug in autoconf 2.13 in the AC_EXEEXT macro. If the lang
  23. # is set to C++ the extension will be .C, which confuses the macro
  24. # and makes it think the executable extension is ".C". We currently
  25. # work around this by just setting EXEEXT to .exe on windows.
  26. EXEEXT=""
  27.  
  28. #--------------------------------------------------------------------
  29. #    see if --with-jikespg location is given on the command line
  30. #--------------------------------------------------------------------
  31.  
  32. AC_ARG_WITH(jikespg, [  --with-jikespg=PROG     location of jikes parser generator (optional)],
  33.     JIKESPG=$withval, JIKESPG=NONE)
  34.  
  35. if test "$JIKESPG" != "NONE"; then
  36.     if test ! -f "$JIKESPG" || test ! -x "$JIKESPG"; then
  37.         AC_MSG_ERROR([jikespg argument '$JIKESPG' is not a file or is not executable])
  38.     fi
  39. else
  40.     JIKESPG=jikespg
  41. fi
  42.  
  43. #--------------------------------------------------------------------
  44. #    see if --with-icc is given on the command line
  45. #--------------------------------------------------------------------
  46.  
  47. AC_ARG_WITH(icc, [  --with-icc=PROG         use the IBM Cset++ compiler, optional PROG can be given instead of searching on the PATH],
  48.     DESIRED_CXX=$withval, DESIRED_CXX=NONE)
  49.  
  50. if test "$DESIRED_CXX" != "NONE"; then
  51.     if test "$DESIRED_CXX" = yes; then
  52.         AC_PATH_PROG(CXX, icc)
  53.  
  54.         if test "$CXX" = ""; then
  55.             AC_PATH_PROG(CXX, xlC)
  56.  
  57.             if test "$CXX" = ""; then
  58.                 AC_MSG_ERROR([could not find icc or xlC on your PATH.])
  59.             fi
  60.         fi
  61.     fi
  62.  
  63.     if test ! -f "$CXX" || test ! -x "$CXX"; then
  64.         AC_MSG_ERROR([argument '$CXX' is not a file or is not executable])
  65.     fi
  66.  
  67.     CXX_NAME=icc
  68.     CXXREQUIREDFLAGS="-c -DICC"
  69.     CXXOPTFLAGS="-O2"
  70.     CXXDEBUGFLAGS="-DTEST"
  71.     LD=$CXX
  72.     LDDEBUGFLAGS="-g"
  73.     LDFLAGS='-L. -o $(EXECUTABLE)'
  74. fi
  75.  
  76. #--------------------------------------------------------------------
  77. #    see if --with-CC is given on the command line
  78. #--------------------------------------------------------------------
  79.  
  80. AC_ARG_WITH(CC, [  --with-CC=PROG          use the AT&T CC compiler, optional PROG can be given instead of searching on the PATH],
  81.     DESIRED_CXX=$withval, DESIRED_CXX=NONE)
  82.  
  83. if test "$DESIRED_CXX" != "NONE"; then
  84.     if test "$DESIRED_CXX" = yes; then
  85.         AC_PATH_PROG(CXX, CC)
  86.         if test "$CXX" = ""; then
  87.             AC_MSG_ERROR([could not find CC on your PATH.])
  88.         fi
  89.     fi
  90.  
  91.     if test ! -f "$CXX" || test ! -x "$CXX"; then
  92.         AC_MSG_ERROR([argument '$CXX' is not a file or is not executable])
  93.     fi
  94.  
  95.     CXX_NAME=CC
  96.  
  97.     CXXREQUIREDFLAGS="-c -ansi"
  98.     CXXOPTFLAGS="-fast"
  99.     CXXDEBUGFLAGS="-DTEST -g -xs"
  100.     LD=$CXX
  101.     LDDEBUGFLAGS="-g"
  102.     LDFLAGS='-L. -o $(EXECUTABLE)'
  103. fi
  104.  
  105. #--------------------------------------------------------------------
  106. #    see if --with-mingwin is given on the command line
  107. #--------------------------------------------------------------------
  108.  
  109. AC_ARG_WITH(mingwin, [  --with-mingwin          use the mingwin32 compiler environment],
  110.     WITH_MINGWIN=$withval, WITH_MINGWIN=0)
  111.  
  112. #--------------------------------------------------------------------
  113. # If no other compiler was given as a --with option then we use default
  114. #--------------------------------------------------------------------
  115.  
  116. if test "$CXX_NAME" = ""; then
  117.     CXX_NAME="$CXX"
  118.  
  119.     CXXREQUIREDFLAGS="-c"
  120.     if test "$WITH_MINGWIN" = "0"; then
  121.         CXXREQUIREDFLAGS="$CXXREQUIREDFLAGS -ansi"
  122.     fi
  123.     CXXOPTFLAGS="-O2"
  124.     CXXDEBUGFLAGS="-DTEST -g"
  125.     LD="$CXX"
  126.     LDDEBUGFLAGS="-g"
  127.     LDFLAGS='-L. -o $(EXECUTABLE)'
  128.  
  129.     if test "$GXX" != "yes"; then
  130.        LIBS="$LIBS -lm"
  131.     fi
  132. fi
  133.  
  134. #--------------------------------------------------------------------
  135. # Do some extra work to find the mingwin include files in case
  136. # that mingwin can not find them on its own.
  137. #--------------------------------------------------------------------
  138.  
  139. if test "$WITH_MINGWIN" != "0"; then
  140.     AC_PATH_PROG(TMP_PROG, c++)
  141.     if test "$TMP_PROG" = ""; then
  142.         AC_MSG_ERROR([Could not find c++ on the PATH])
  143.     fi
  144.  
  145.     CYGROOT=`dirname $TMP_PROG`
  146.     CYGROOT=`dirname $CYGROOT`
  147.     if test "${CYGROOT}" = "/"; then
  148.         CYGROOT=
  149.     fi
  150.  
  151.     MING_INCLUDE=`ls ${CYGROOT}/*/include/*/direct.h`
  152.  
  153.     if test "$MING_INCLUDE" != ""; then
  154.         MING_INCLUDE=`dirname $MING_INCLUDE`
  155.         CXXREQUIREDFLAGS="$CXXREQUIREDFLAGS -I$MING_INCLUDE"
  156.         CXXFLAGS="$CXXFLAGS -I$MING_INCLUDE"
  157.     fi
  158. fi
  159.  
  160.  
  161. # echo the compiler we are using
  162.  
  163. AC_MSG_CHECKING([for the compiler to use])
  164. AC_MSG_RESULT([$CXX.])
  165.  
  166.  
  167. # Figure out what platform we are running on so that we know
  168. # what flags to give to the compiler
  169.  
  170.  
  171. # Keep case statements in alphabetical order.
  172. case "`uname -s`" in
  173.     AIX)
  174.         if test $CXX_NAME = "icc"; then
  175.             CXXREQUIREDFLAGS="$CXXREQUIREDFLAGS -langlvl=ansi -qnotempinc -+ -qinlglue"
  176.             CXXDEBUGFLAGS="$CXXDEBUGFLAGS -g"
  177.         fi
  178.  
  179.         CXXREQUIREDFLAGS="$CXXREQUIREDFLAGS -DUNIX"
  180.         LDFLAGS="$LDFLAGS $LDDEBUGFLAGS"
  181.         ;;
  182.     FreeBSD)
  183.     CXXREQUIREDFLAGS="$CXXREQUIREDFLAGS -DUNIX -DIEEE_DIV_0 -DGNU_LIBC5"
  184.  
  185.         if test $GXX = "yes"; then
  186.             CXXREQUIREDFLAGS="-funsigned-char $CXXREQUIREDFLAGS"
  187.         fi
  188.  
  189.     # Check byte-order
  190.         case "`uname -m`" in
  191.             alpha)
  192.                 ;;
  193.             i?86)
  194.                 ;;
  195.             *)
  196.                 AC_MSG_ERROR([FreeBSD arch '`uname -m`' not supported.])
  197.                 ;;
  198.         esac
  199.     ;;
  200.     HP-UX)
  201.         if test $GXX = "yes"; then
  202.             CXXREQUIREDFLAGS="-funsigned-char $CXXREQUIREDFLAGS"
  203.         fi
  204.         CXXREQUIREDFLAGS="$CXXREQUIREDFLAGS -DUNIX -D_INCLUDE_POSIX_SOURCE"
  205.         CXXREQUIREDFLAGS="$CXXREQUIREDFLAGS -DSTAT_POSIX_1"
  206.         LDFLAGS="$LDDEBUGFLAGS $LDFLAGS -lstdc++"
  207.         ;;
  208.     IRIX)
  209.         CXXREQUIREDFLAGS="$CXXREQUIREDFLAGS -DUNIX "
  210.         if test $GAS != "yes"; then
  211.             CXXREQUIREDFLAGS="$CXXREQUIREDFLAGS -mmips-as"
  212.         fi
  213.         ;;
  214.     GNU)
  215.         # Basically the same as for Linux but we are sure to use GNU libc6
  216.         # and the HURD only runs on i386
  217.         CXXREQUIREDFLAGS="$CXXREQUIREDFLAGS -DUNIX"
  218.  
  219.         if test $GXX = "yes"; then
  220.           CXXREQUIREDFLAGS="-funsigned-char $CXXREQUIREDFLAGS"
  221.         fi
  222.  
  223.         CXXREQUIREDFLAGS="$CXXREQUIREDFLAGS -DSTAT_POSIX"
  224.         ;;
  225.     Linux)
  226.     CXXREQUIREDFLAGS="$CXXREQUIREDFLAGS -DUNIX"
  227.  
  228.         if test $GXX = "yes"; then
  229.             CXXREQUIREDFLAGS="-funsigned-char $CXXREQUIREDFLAGS"
  230.         fi
  231.  
  232.         # test to see if we are using libc5 or gnulib5 (libc6)
  233.         if test -f /lib/libc.so.5 && test ! -f /lib/libc.so.6; then
  234.             CXXREQUIREDFLAGS="$CXXREQUIREDFLAGS -DGNU_LIBC5"
  235.         else
  236.             CXXREQUIREDFLAGS="$CXXREQUIREDFLAGS -DSTAT_POSIX"
  237.         fi
  238.         ;;
  239.     OS2)
  240.         if test $CXX_NAME = icc; then
  241.            O=obj
  242.            CXXREQUIREDFLAGS="-Tdp -G5 $CXXREQUIREDFLAGS -DUNIX_FILE_SYSTEM -Dcerr=cout"
  243.            CXXOPTFLAGS="$CXXOPTFLAGS -Tdp -O -DNDEBUG"
  244.            CXXDEBUGFLAGS="$CXXDEBUGFLAGS -Ti"
  245.            LDDEBUGFLAGS="/Ti+"
  246.            LDFLAGS="$LDFLAGS /O:\$(EXECUTABLE) /PM:VIO /STACK:400000 /NOE"
  247.  
  248.            # link to an obj file in the icc directory
  249.            TMP=$CXX
  250.            TMP=`dirname $TMP`
  251.            TMP=`dirname $TMP`
  252.            SYSOBJECTS="$TMP\\lib\\setargv.obj"
  253.         fi    
  254.         ;;
  255.     OSF1)
  256.         CXXREQUIREDFLAGS="$CXXREQUIREDFLAGS -DUNIX"
  257.         ;;
  258.     SunOS)
  259.         CXXREQUIREDFLAGS="$CXXREQUIREDFLAGS -DUNIX"
  260.  
  261.         if test $CXX_NAME = "icc"; then
  262.                 CXXREQUIREDFLAGS="-langlvl=ansi -+ -qnotempinc $CXXREQUIREDFLAGS"
  263.                 CXXOPTFLAGS="$CXXOPTFLAGS -O3 -qstrict"
  264.                 CXXDEBUGFLAGS="$CXXDEBUGFLAGS -g"
  265.                 LDFLAGS="$LDFLAGS -Bstatic"
  266.        else
  267.                 if test $GXX = "yes"; then
  268.                         CXXREQUIREDFLAGS="-funsigned-char $CXXREQUIREDFLAGS"
  269.                 fi
  270.        fi
  271.     ;;
  272.     *CYGWIN*)
  273.         if test $WITH_MINGWIN = "0"; then
  274.             CXXREQUIREDFLAGS="$CXXREQUIREDFLAGS -DUNIX -DCYGWIN"
  275.         else
  276.             # FIXME: buggy mingwin will not link to msvcrtd.dll
  277.             LIBS="$LIBS -lmsvcrt"
  278.             #if test "$DEBUG_SYMBOLS" = "yes"; then
  279.             #    LIBS="$LIBS -lmsvcrtd"
  280.             #else
  281.             #    LIBS="$LIBS -lmsvcrt"
  282.             #fi
  283.             CXXREQUIREDFLAGS="$CXXREQUIREDFLAGS -mno-cygwin -DMINGWIN -DWIN32_FILE_SYSTEM"
  284.             LDFLAGS="$LDFLAGS -mno-cygwin"
  285.  
  286.             # We also need to set CXXFLAGS so that tests below use these flags
  287.             CXXFLAGS="$CXXFLAGS -mno-cygwin"
  288.         fi
  289.  
  290.         if test $GXX = "yes"; then
  291.             CXXREQUIREDFLAGS="-funsigned-char $CXXREQUIREDFLAGS"
  292.         fi
  293.  
  294.         # FIXME : workaround for bug in AC_EXEEXT macro
  295.         EXEEXT=.exe
  296.  
  297.         ;;
  298.     AmigaOS)
  299.     CXXREQUIREDFLAGS="$CXXREQUIREDFLAGS -DBIGENDIAN -Dstat=mystat -Dfopen=myfopen -Dopendir=myopendir -Dmkdir=mymkdir"
  300.     SYSOBJECTS="GG:lib/libnix/swapstack.o -noixemul"
  301.     case "$CC_NAME" in
  302.         ?++)
  303.         CXXREQUIREDFLAGS="-funsigned-char $CXXREQUIREDFLAGS"
  304.         ;;
  305.     esac
  306.     ;;
  307.     *)
  308.         AC_MSG_ERROR([platform '`uname -s`' is not supported.])
  309.         ;;
  310. esac
  311.  
  312.  
  313. #--------------------------------------------------------------------
  314. #   Check for endianness
  315. #--------------------------------------------------------------------
  316. AC_C_BIGENDIAN
  317.  
  318. #--------------------------------------------------------------------
  319. #   see if "bool" is a builtin type
  320. #--------------------------------------------------------------------
  321.  
  322. AC_CACHE_CHECK(builtin bool type, jikes_cv_has_bool,
  323.     AC_TRY_COMPILE([],[bool some_boolean_value = true;],
  324.     jikes_cv_has_bool=yes, jikes_cv_has_bool=no))
  325. if test "x$jikes_cv_has_bool" = "xyes"; then
  326.     CXXREQUIREDFLAGS="$CXXREQUIREDFLAGS -DHAVE_BOOL"
  327. fi
  328.  
  329. #--------------------------------------------------------------------------
  330. #   Check for broken USHRT_MAX (under Mingwin and maybe some other systems
  331. #--------------------------------------------------------------------------
  332.  
  333. AC_CACHE_CHECK(for broken ushrt_max, jikes_cv_ushrt_max_is_broken,
  334.     AC_TRY_COMPILE([
  335. #include <limits.h>
  336. #if ! (USHRT_MAX == 0xFFFF)
  337. int hi=0;
  338. #endif
  339. ],[return 0;],
  340.     jikes_cv_ushrt_max_is_broken=no, jikes_cv_ushrt_max_is_broken=yes))
  341. if test "$jikes_cv_ushrt_max_is_broken" = "yes"; then
  342.     CXXREQUIREDFLAGS="$CXXREQUIREDFLAGS -DBROKEN_USHRT_MAX"
  343. fi
  344.  
  345. #----------------------------------------------------------------------------------
  346. #   Check for some headers which are not present on all supported platforms
  347. #----------------------------------------------------------------------------------
  348. AC_CHECK_HEADERS(wchar.h)
  349.  
  350. #--------------------------------------------------------------------
  351. #   Check for wint_t in wchar.h (broken on linux libc5, cygwin, maybe others?)
  352. #--------------------------------------------------------------------
  353. AC_CACHE_CHECK(for wint_t in wchar.h, jikes_cv_has_wint_t,
  354.     AC_TRY_COMPILE([
  355. #ifdef HAVE_WCHAR_H
  356. # include <wchar.h>
  357. #endif
  358. ],[wint_t foo;],
  359.         CXXREQUIREDFLAGS="$CXXREQUIREDFLAGS -DHAVE_WINT_T" 
  360.         jikes_cv_has_wint_t=yes, 
  361.         jikes_cv_has_wint_t=no))
  362.  
  363. if test $jikes_cv_has_wint_t = "no"; then
  364.     AC_TRY_COMPILE([
  365. #ifdef HAVE_WCHAR_H
  366. # include <wchar.h>
  367. #endif
  368. typedef unsigned int wint_t;
  369. ],[wint_t foo;],
  370.     ,
  371.     AC_MSG_ERROR([Can't fix broken wchar.h]))
  372. fi
  373.  
  374. #--------------------------------------------------------------------
  375. #   Check for wcs functions in wchar.h or string.h
  376. #   We want to treat "implicit declaration of function" types of
  377. #   warnings as errors here because g++ does not do that by itself.
  378. #--------------------------------------------------------------------
  379.  
  380. ac_saved_cxx_flags=$CXXFLAGS
  381. if test $GXX = "yes"; then
  382.     CXXFLAGS="$CXXFLAGS -Werror"
  383. fi
  384.  
  385. AC_CACHE_CHECK([for declaration of wcslen],
  386.     ac_cv_declared_wcslen,
  387. [AC_TRY_COMPILE([
  388. #ifdef HAVE_WCHAR_H
  389. # include <wchar.h>
  390. #endif
  391. #include <string.h>
  392. ], [ wcslen(NULL) ],
  393.     ac_cv_declared_wcslen=yes, ac_cv_declared_wcslen=no)
  394. ])
  395. if test "x$ac_cv_declared_wcslen" = "xyes"; then
  396.     CXXREQUIREDFLAGS="$CXXREQUIREDFLAGS -DHAVE_WCSLEN"
  397. fi
  398.  
  399. AC_CACHE_CHECK([for declaration of wcscpy],
  400.     ac_cv_declared_wcscpy,
  401. [AC_TRY_COMPILE([
  402. #ifdef HAVE_WCHAR_H
  403. # include <wchar.h>
  404. #endif
  405. #include <string.h>
  406. ], [ wcscpy(NULL, NULL) ],
  407.     ac_cv_declared_wcscpy=yes, ac_cv_declared_wcscpy=no)
  408. ])
  409. if test "x$ac_cv_declared_wcscpy" = "xyes"; then
  410.     CXXREQUIREDFLAGS="$CXXREQUIREDFLAGS -DHAVE_WCSCPY"
  411. fi
  412.  
  413. AC_CACHE_CHECK([for declaration of wcsncpy],
  414.     ac_cv_declared_wcsncpy,
  415. [AC_TRY_COMPILE([
  416. #ifdef HAVE_WCHAR_H
  417. # include <wchar.h>
  418. #endif
  419. #include <string.h>
  420. ], [ wcsncpy(NULL, NULL, 0) ],
  421.     ac_cv_declared_wcsncpy=yes, ac_cv_declared_wcsncpy=no)
  422. ])
  423. if test "x$ac_cv_declared_wcsncpy" = "xyes"; then
  424.     CXXREQUIREDFLAGS="$CXXREQUIREDFLAGS -DHAVE_WCSNCPY"
  425. fi
  426.  
  427. AC_CACHE_CHECK([for declaration of wcscat],
  428.     ac_cv_declared_wcscat,
  429. [AC_TRY_COMPILE([
  430. #ifdef HAVE_WCHAR_H
  431. # include <wchar.h>
  432. #endif
  433. #include <string.h>
  434. ], [ wcscat(NULL, NULL) ],
  435.     ac_cv_declared_wcscat=yes, ac_cv_declared_wcscat=no)
  436. ])
  437. if test "x$ac_cv_declared_wcscat" = "xyes"; then
  438.     CXXREQUIREDFLAGS="$CXXREQUIREDFLAGS -DHAVE_WCSCAT"
  439. fi
  440.  
  441. AC_CACHE_CHECK([for declaration of wcscmp],
  442.     ac_cv_declared_wcscmp,
  443. [AC_TRY_COMPILE([
  444. #ifdef HAVE_WCHAR_H
  445. # include <wchar.h>
  446. #endif
  447. #include <string.h>
  448. ], [ wcscmp(NULL, NULL) ],
  449.     ac_cv_declared_wcscmp=yes, ac_cv_declared_wcscmp=no)
  450. ])
  451. if test "x$ac_cv_declared_wcscmp" = "xyes"; then
  452.     CXXREQUIREDFLAGS="$CXXREQUIREDFLAGS -DHAVE_WCSCMP"
  453. fi
  454.  
  455. AC_CACHE_CHECK([for declaration of wcsncmp],
  456.     ac_cv_declared_wcsncmp,
  457. [AC_TRY_COMPILE([
  458. #ifdef HAVE_WCHAR_H
  459. # include <wchar.h>
  460. #endif
  461. #include <string.h>
  462. ], [ wcsncmp(NULL, NULL, 0) ],
  463.     ac_cv_declared_wcsncmp=yes, ac_cv_declared_wcsncmp=no)
  464. ])
  465. if test "x$ac_cv_declared_wcsncmp" = "xyes"; then
  466.     CXXREQUIREDFLAGS="$CXXREQUIREDFLAGS -DHAVE_WCSNCMP"
  467. fi
  468.  
  469. CXXFLAGS=$ac_saved_cxx_flags
  470.  
  471. #--------------------------------------------------------------------
  472. #   Check if "IBM Classes for UNICODE library is present
  473. #--------------------------------------------------------------------
  474. ac_saved_ld_flags=$LDFLAGS
  475. LDFLAGS=
  476. AC_CHECK_LIB(icu-uc,ucnv_getDefaultName, CXXREQUIREDFLAGS="$CXXREQUIREDFLAGS -DHAVE_LIB_ICU_UC"; LIBS="$LIBS -licu-uc")
  477. LDFLAGS=$ac_saved_ld_flags
  478.  
  479. #--------------------------------------------------------------------
  480. #   Check for java runtime and compiler
  481. #--------------------------------------------------------------------
  482.  
  483. # First check for SUN javac
  484. AC_CHECK_PROG(JAVAC, javac , javac, NONE) 
  485. if test "$JAVAC" != "NONE"; then
  486.     DO=NOTHING
  487. else
  488.     # if SUN javac not found, check for jikes
  489.     AC_CHECK_PROG(JAVAC, jikes , jikes, NONE)
  490.     # no specific flags for jikes
  491.     if test "$JAVAC" != "NONE"; then
  492.         DO=NOTHING
  493.     else
  494.         AC_MSG_WARN([Could not find javac or jikes on the path, you may want to
  495. compile gencode.java and run it on your own.])
  496.     fi
  497. fi
  498.  
  499. AC_CHECK_PROG(JAVA,  java ,  java,  NONE)
  500. if test "$JAVA" != "NONE"; then
  501.     # We need to create code.h and code.cpp in srcdir not the
  502.     # build dir because the Makefile looks for them in srcdir
  503.     here=`pwd`
  504.     cd ${srcdir}
  505.     $JAVAC gencode.java
  506.     CLASSPATH=. ; export CLASSPATH
  507.     $JAVA gencode
  508.     cd ${here}
  509. fi
  510.  
  511.  
  512. # The OBJEXT and EXEEXT variables are set in the AC_OBJEXT
  513. # and AC_EXEEXT macros.
  514.  
  515. ERASE="rm -f"
  516. O=${OBJEXT}
  517. EXECUTABLE=jikes${EXEEXT}
  518.  
  519. #--------------------------------------------------------------------
  520. #    see if --enable-debug was given, if so use debug symbols
  521. #--------------------------------------------------------------------
  522.  
  523. AC_ARG_ENABLE(debug, [  --enable-debug          build with debugging symbols],
  524.     [DEBUG_SYMBOLS=$enableval], [DEBUG_SYMBOLS=no])
  525.  
  526. if test "x$DEBUG_SYMBOLS" = "xyes"; then
  527.     CXXFLAGS='$(CXXREQUIREDFLAGS) $(CXXDEBUGFLAGS)'
  528. else
  529.     CXXFLAGS='$(CXXREQUIREDFLAGS) $(CXXOPTFLAGS)'
  530.     LDFLAGS="-s $LDFLAGS"
  531. fi
  532.  
  533. # Subst variables into Makefile.in to produce the Makefile
  534.  
  535. BUILD_DIR=`pwd`
  536. AC_SUBST(BUILD_DIR)
  537.  
  538. AC_SUBST(CXX)
  539. AC_SUBST(CXXREQUIREDFLAGS)
  540. AC_SUBST(CXXDEBUGFLAGS)
  541. AC_SUBST(CXXOPTFLAGS)
  542. AC_SUBST(CXXFLAGS)
  543. AC_SUBST(ERASE)
  544. AC_SUBST(EXECUTABLE)
  545. AC_SUBST(LD)
  546. AC_SUBST(LDFLAGS)
  547. AC_SUBST(O)
  548. AC_SUBST(SYSOBJECTS)
  549. AC_SUBST(LIBS)
  550.  
  551. AC_OUTPUT([Makefile])
  552.